﻿using Owin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http;
using System.Web.Http.Routing;

namespace ConsoleOwin
{
    public class BootStartup
    {
        public void Configuration(IAppBuilder appBuilder)
        {
            appBuilder.UseWelcomePage("/");

            var config = new HttpConfiguration();
            config.Routes.MapHttpRoute(
               name: "DefaultApi",
               routeTemplate: "api/{controller}/{id}",
               defaults: new { id = RouteParameter.Optional }
            );
            config.MessageHandlers.Add(new CompressHandler());
            appBuilder.UseWebApi(config);
        }
    }
}